package com.carleasoft.mps.cms.business.leave.constants;

/**
 * @author: yangHao
 * @createDate:2023/5/17
 * @description:
 */
public enum LeaveEnum {

    TO_BE_RELEASED(1, "周末请假"),
    NOT_PASS(2, "事假"),
    RELEASE(3, "病假"),
    FINISH(4, "身体保障类"),
    DELETE(5, "疗养假"),
    DEFAULT(6, "婚假"),
    PENDING_REVIEW(7, "产假"),
    MESSAGE_REVIEW(8, "护理假"),
    MESSAGE_ONE(9, "休假"),
    MESSAGE_TWO(10, "工作日请假"),
    ;

    private Integer code;

    private String message;

    LeaveEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }


    public Integer getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }


    public static String getPaymentType(int value) {
        for (LeaveEnum paymentTypeEnum : LeaveEnum.values()) {
            if (value == paymentTypeEnum.getCode()) {
                return paymentTypeEnum.getMessage();
            }
        }
        return null;
    }

}
